#include <bits/stdc++.h>
using namespace std;
const double eps=1e-6;
const int inf=0x3f3f3f3f;
const double T=1e9;
struct p{double x,y,z;}po[150];
int n;
double dis(p a,p b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z));}
double solve(){
    double step=T,ans=inf,mt;
    p z={0,0,0};
    int s=0;
    while(step>eps){
        for(int i=1;i<=n;i++)if(dis(z,po[s])<dis(z,po[i]))s=i;
        mt=dis(z,po[s]),ans=min(ans,mt);
        z.x+=(po[s].x-z.x)/T*step;
        z.y+=(po[s].y-z.y)/T*step;
        z.z+=(po[s].z-z.z)/T*step;
        step*=0.97;
    }
    return ans;
}
int main(){cin>>n;
    for (int i=1;i<=n;i++)scanf("%lf%lf%lf",&po[i].x,&po[i].y,&po[i].z);
    printf("%.8f\n",solve());
    return 0;
}